ZK UI plugin,the same as the ZKGrails plugin, seamlessly integrates ZK with Grails' infrastructures.The difference is it uses the Grails' infrastructures more, such as gsp, controllers rather than zk's zul.ZK UI Grails plug-ins brings powerful features as followsUse Tag Libraries
<z:window title="My First ZK UI Application" border="normal">
Hello World!
</z:window>
Provides a Composer Artefacts simplify the integration between grails and zkUsage:
grails create-composer [name]
A groovy way to create zk components, following groovy Builder paradigmController
def index = {
def window = new Window(title: "listbox demo", border: "normal")
window << {
listbox {
listhead(sizable: true) {
listheader(label: "name", sort: "auto")
listheader(label: "gender", sort: "auto")
}
listitem {
listcell(label: "Mary")
listcell(label: "FEMALE")
}
listitem {
listcell(label: "John")
listcell(label: "MALE")
}
listitem {
listcell(label: "Jane")
listcell(label: "FEMALE")
}
listitem {
listcell(label: "Henry")
listcell(label: "MALE")
}
listfoot {
listfooter {
label(value: "This is footer1")
}
listfooter {
label(value: "This is footer2")
}
}
}
}
[window:window]
}
View
<z:render comp="${window}"/>
Provides a very convenient API for extracting and manipulating zk component, using the jquery-like methods.View
<z:window id="window">
<z:textbox name="t1" value="value1"/>
<z:textbox id="t2" value="value2"/>
<z:textbox value="value3"/>
</z:window>
Selector code
assert 3 == window.select("textbox").size()
assert "value2" == window.select("#t2")[0].value
assert "value1" == window.select("textbox[name=t1]")[0].value